Assignemnt #35 and Thirty-second Program

Code

///Name: Derrick Andreasen
///Period: 7
///Program name: Thirty-second Program
///File name: ThirsProg.java
///Date Finished:10/2/2015
import java.util.Scanner;

public class ThirsProg
{
     public static void main( String[] args )
     {
        int people = 30;
        int cars = 40;
        int buses = 15;
        
        if ( cars > people )
        {
            System.out.println( "We should take the cars." );
        }
        else if (cars < people )
        {
        System.out.println( "We should not take the cars." );
        }
        else
        {
        System.out.println( "We can't decide." );
        }
        
        if ( buses > cars )
        {
            System.out.println( "That's too many buses." );
        }
        else if (buses < cars )
        { 
        System.out.println( "Maybe we could take the busses." );
        }
        else
        {
        System.out.println( "We still cant decide." );
        }
        if ( people > buses )
        {
            System.out.println( "All right, lets just take the buses." );
        }
        else
        {
        System.out.println( "Fine, let's stay home then." );
        }
    }
}

///else if and else are giving the code things to print if the normal if is false.
//Removing  the else at the beginning of an else statement will result in the else print not showing when it should. This happens when the computer can't read that the else statement.
     
       

Picture of the output

Assignment 35